<template lang='pug'>
.wrapper.ad_img_2s_short(v-if = "show")
  a(:href="data[0].linkUrl || 'javascript:;'")
    img(:src="data[0].picUrl | imgUrl", :alt="data[0].elementName")
  a(:href="data[1].linkUrl || 'javascript:;'")
    img(:src="data[1].picUrl | imgUrl", :alt="data[1].elementName")
</template>
<script>
export default {
  data () {
    return {
      show: true,
      data: []
    }
  },
  props: ['cdata'],
  created () {
    if (!this.cdata[0].tag) {
      this.show = false
      return
    }
    if (this.cdata[0].tag.length < 2) {
      this.show = false
      return
    }
    this.data = this.cdata[0].tag
  }
}
</script>
<style lang='scss' scoped>
@import './tool.scss';
.ad_img_2s_short {
  margin-top: 1px;
  display: block;
  height: to_rem(180px);
  a {
    display: block;
    float: left;
    width: to_rem(375px);
    box-sizing: border-box;
    height: to_rem(181px);
    border-bottom: 1px solid #f1f1f1;
    img {
      width: to_rem(375px);
      height: to_rem(180px);
    }
  }
  a:first-of-type {
    border-right: 1px solid #f1f1f1;
  }
}
</style>  